home *** CD-ROM | disk | FTP | other *** search
/ The CICA Windows Explosion! / The CICA Windows Explosion! - Disc 2.iso / programr / dpmigcc5.zip / RSX / DOC / KRNLDEB.TXT < prev    next >
Text File  |  1994-12-12  |  2KB  |  60 lines

  1.  
  2. Debugging RSX (32bit):
  3. ----------------------
  4.  
  5. 1) Build debugging version of rsx:
  6.     (you should use ndmake, dmake)
  7.     run makefile in \rsx\source\fpu-emu
  8.     run makefile in \rsx\source
  9.  
  10. 2) edit the path for the GDB in \rsx\source\rsxdeb.bat
  11.  
  12. 3) Execute batch-file rsxdeb.bat
  13.     to call:  rsxdeb.bat myprog.exe
  14.     myprog.exe is your test program
  15.     (rsx32 need work / GDB can't debug itself in kernel)
  16.  
  17.  
  18. Sample Session:
  19. ---------------
  20. c:\rsx\source> rsxdeb sample/exec.emx            // your command
  21.  
  22. RSX32 [beta rev4] dpmi 0.9/1.0 extender (c) Rainer Schnitker '93 '94
  23. GDB is free software and you are welcome to distribute copies of it
  24. under certain conditions; type "show copying" to see the conditions.
  25. There is absolutely no warranty for GDB; type "show warranty" for details.
  26. GDB 4.11 (emx), Copyright 1993 Free Software Foundation, Inc...
  27.  
  28. "c:/rsx/source/sample/exec.emx" is not a core dump: File format not recognized
  29.                             // ignore this
  30.  
  31. (gdb) tb sys_write                    // temp breakpoint
  32. Breakpoint 1 at 0x1ccc3: file fs.c, line 165.
  33. (gdb) r                         // run !! (neccesary)
  34. Starting program: c:/rsx/source/rsx32.emx
  35. KERNEL DEBUG MODE with second prg sample/exec.emx   // correct message
  36. sys_write (fd=1, buf=53183, bytes=7) at fs.c:165
  37. 165        if (fd >= N_FILES)
  38. (gdb) n                         // next
  39. 167        if (!(file = npz->filp[fd]))
  40. .
  41. .
  42. .
  43. .
  44. (gdb) q                         // quit
  45.  
  46.  
  47. Hints:
  48. ------
  49.  
  50. The "Kernel Debug Mode" allowes to debug all function following
  51. the entry function int21() in sysemx.c.
  52. These are sysemx.c, cdosx32.c, process.c, termio.c, ...
  53.  
  54. Global variables can be changed from GDB syscalls.
  55. GDB uses also the IO transfer buffer (could changed).
  56.  
  57. You can't debug rsx.c. This file will never executed again.
  58.  
  59. Don't debug exception handlers or kernel debug functions!
  60.